<template>
    <div>
        <a-modal
         class="scheme-modal flow-path-model-box"
         v-model:visible="visibleShowIncrease" 
         title='办理'
         :maskClosable="false"
         :closable="false"
         :destroyOnClose="true"
         width="100%"
         wrapClassName="full-modal"
         >
         <div style="height: 100%;background: #fff;">
            <a-spin size="large" :spinning="spinning" :key="spinningKey">
                <div style="width: 100%; background-color: #fff;position: fixed; top: 0;z-index: 99;left:0;padding: 10px 10px 10px 24px;display:flex;">
                    <div>
                        <a-button class="blue-btn" type="primary" @click="visibleShowIncrease = false">返回</a-button>
                        <a-button style="margin-left: 10px;" class="blue-btn" type="primary" @click="refreshClick()">刷新</a-button>
                    </div>
                    <div style="margin-left: 50px;">
                        <a-button class="blue-btn" type="primary" @click="linkHandling('spzgqrlcSubmitFlow')">办理</a-button>
                        <a-button style="margin-left: 10px;" class="blue-btn" type="primary" @click="returnPreviousLink('spzgqrlcReturnZgqrFlow')">退回</a-button>
                    </div> 
                </div>
                <a-tabs v-model:activeKey="matterActiveKey" @change="matterChange" class="matter-handle-tabs">
                    <a-tab-pane key="事项办理" tab="事项办理"></a-tab-pane>
                    <a-tab-pane key="事项信息" tab="事项信息"></a-tab-pane>
                </a-tabs>
                <div style="width: 100%;height: 80px;"></div>
                <div v-show="matterActiveKey == '事项信息'">
                    <eventSet ref="eventSetRef" :parameter="parameterData"/>
                </div>
                <!-- <a-collapse v-model:activeKey="collapseActiveKeyArr">
                    <a-collapse-panel key="1" :header="'事项信息内容  '">
                        <dealWith :key="compSelectorkey" ref="dealWithRef" :parameter="addEditParameter" @successReturn="successReturn"/>
                    </a-collapse-panel>
                </a-collapse> -->
                <div v-show="matterActiveKey=='事项办理'">  
                    <a-collapse v-model:activeKey="activeKeyArr" class="collapse-original">
                        <a-collapse-panel key="1" header="整改通知书">
                            <commpVxeTable
                                :key="refreshTable"
                                :config="comprehensiveEvaluationConfig" 
                                :columns="comprehensiveEvaluationColumns"
                                :formItem="[]" 
                                :adaptiveHeight="true"
                            > 
                                <template v-slot:fwjccmc_slots="{row}" data-desc="自定操作栏">
                                    <span>{{ row.fwjxsmc }}{{ row.fwjlx }}</span>
                                </template>
                                <template v-slot:operation_btn="{row}" data-desc="自定操作栏">
                                    <a-form layout="inline" class="search-form" >
                                        <a-form-item class="vxe-table-box-w">
                                            <a-button class="blue-btn" type="primary" @click="viewClick(row)" >查看</a-button>
                                        </a-form-item>
                                        <a-form-item class="vxe-table-box-w">
                                            <a-button class="blue-btn" type="primary" @click="downloadClick(row)" >下载</a-button>
                                        </a-form-item>
                                    </a-form>
                                </template>
                            </commpVxeTable>
                        </a-collapse-panel>
                        <a-collapse-panel key="2" header="整改确认报告书">
                            <a-form layout="inline" style="margin-bottom:10px">
                                <a-form-item >
                                    <a-button class="blue-btn" type="primary" @click="generateRecord('整改确认报告书','整改确认报告书')">生成记录</a-button>
                                </a-form-item>
                            </a-form>
                            <commpVxeTable
                                :key="refreshTable"
                                :config="REPORTConfig" 
                                :columns="REPORTColumns"
                                :formItem="[]" 
                                :adaptiveHeight="true"
                            > 
                                <template v-slot:fwjccmc_slots="{row}" data-desc="自定操作栏">
                                    <span>{{ row.fwjxsmc }}{{ row.fwjlx }}</span>
                                </template>
                                <template v-slot:operation_btn="{row}" data-desc="自定操作栏">
                                    <a-form layout="inline" class="search-form" >
                                        <a-form-item class="vxe-table-box-w">
                                            <a-button class="blue-btn" type="primary" @click="viewClick(row)" >查看</a-button>
                                        </a-form-item>
                                        <a-form-item>
                                            <a-button class="blue-btn dMould-btn" type="primary" @click="producerMould(row,'整改确认报告书')" >选择模板</a-button>
                                        </a-form-item>
                                        <a-form-item v-if="editMode == '服务端模式'">
                                            <!-- 服务端编辑 -->
                                            <a-button class="blue-btn" type="primary" @click="serverEdit(row)" >编辑</a-button>
                                        </a-form-item>
                                        <a-form-item class="vxe-table-box-w" v-if="row.fwjlx !== '.pdf' && editMode == '客户端模式'">
                                            <a-button class="blue-btn" type="primary" @click="editClick(row,'整改确认报告书')" >编辑</a-button>
                                        </a-form-item>
                                        <a-form-item  v-if="row.fwjlx == '.pdf' && editMode == '客户端模式'">
                                            <a-button class="blue-btn dMould-btn" type="primary" @click="againEdit(row,'整改确认报告书')" >重新编辑</a-button>
                                        </a-form-item>
                                        
                                        <a-form-item class="vxe-table-box-w" >
                                            <a-button class="red-btn" type="primary" @click="deleteClick(row,'整改确认报告书')" >删除</a-button>
                                        </a-form-item>
                                        <a-form-item class="vxe-table-box-w">
                                            <a-upload style="display: inline-block;" :beforeUpload="segmentBeforeUpload" action="" @change="uploadClick($event,row,'整改确认报告书')">
                                                <a-button class="blue-btn" type="primary">上传</a-button>
                                            </a-upload>
                                        </a-form-item>
                                        <a-form-item class="vxe-table-box-w">
                                            <a-button class="blue-btn" type="primary" @click="downloadClick(row)" >下载</a-button>
                                        </a-form-item>
                                    </a-form>
                                </template>
                            </commpVxeTable>
                        </a-collapse-panel>
                    </a-collapse>
                    <!-- <a-form 
                        style="margin-top: 20px;"
                        ref="form"
                        layout="inline" 
                        :form="fthyjForm" >
                        <a-form-item label="被退回意见" v-if="formField.fblzt == '退回'">
                            {{ formField.fthyj }}
                        </a-form-item>
                        <a-form-item label="退回意见" class="comments-or-reasons-box">
                            <a-textarea placeholder="请输入退回意见" :rows="4" 
                                v-decorator="['fthyjInput',{ initialValue:formField.fthyjInput, rules: rules.fthyjInput}]"/>
                        </a-form-item>
                    </a-form>
                    <a-form 
                        style="margin-top: 20px;"
                        ref="form"
                        layout="inline" 
                        :form="spTransactForm" >
                        <div></div>
                        <a-form-item label="办理意见" class="comments-or-reasons-box">
                            <a-textarea
                                @focus="ideaFocusEvent" 
                                @blur="ideaBlur" 
                                v-model:value="formField.spOpinion"
                                @click="ideaClick('技术审评')" placeholder="请输入办理意见" :rows="4" 
                                v-decorator="['spOpinion',{ initialValue:formField.spOpinion, rules: rules.opinion}]"
                                    />
                        </a-form-item>
                        <a-form-item label="短信通知">
                            <a-checkbox style="margin-left: 10px;" v-model:checked="formField.spSmgflag"></a-checkbox>
                        </a-form-item>
                    </a-form>
                    <a-form layout="inline" style="display: flex;justify-content: center;padding-top: 20px;">
                        <a-form-item >
                            <a-button class="blue-btn" type="primary" @click="forwardClick" >退回</a-button>
                        </a-form-item> 
                        <a-form-item >
                            <a-button class="blue-btn" type="primary" @click="sceneSubmitClick('技术审评')" >提交</a-button>
                        </a-form-item>
                    </a-form> -->
                </div>
                <a-modal
                    title="意见"
                    v-model:visible="ideaVisible"
                    @ok="ideaHandleOk"
                    class="idea-modal-box"
                    @cancel="ideaVisible = false"
                >
                    <a-form layout="inline">
                        <a-form-item :label="ideaType" class="pull-input-w">
                            <div style="display: flex;align-items: center;">
                                <vxe-textarea
                                rows="3" 
                                @focus="recordCommentsFocus" 
                                @blur="recordCommentsBlur" 
                                @change="recordCommentsChange"  
                                v-model="opinionsText" 
                                placeholder="请输入或选择意见" 
                                suffix-icon="vxe-icon-search"></vxe-textarea>
                                <a-button style="margin-left: 15px;" class="blue-btn"  type="primary" @click.stop="saveComments" >保存</a-button>
                            </div>
                            <!-- <vxe-input @focus="recordCommentsFocus" @blur="recordCommentsBlur" @change="recordCommentsChange"  v-model:value="opinionsText" placeholder="请输入或选择办理意见" suffix-icon="vxe-icon-search"></vxe-input> -->
                            <div class="opinion-record-box" v-show="isRecordComments">
                                <div v-if="opinionsList.length" class="content-box">
                                    <div v-for="(item,index) in opinionsList" class="content-for">
                                        <div @click.stop="selectIdea(item)"  class="content-item">
                                            <span class="content-text">{{ item.fcontent }}</span>
                                            <a-button class="red-btn" size="small" type="primary" @click.stop="deleteIdea(item)" >删除</a-button>
                                        </div>
                                    </div>
                                </div>
                                <div class="no-data-box" v-else>暂无记录！</div>
                            </div>
                        </a-form-item>
                    </a-form>
                </a-modal>
                <serverEditing ref="serverEditingRef" @refreshChange="manualSuccess"/>
                <serverEditingView ref="serverEditingViewRef" @refreshChange="$event=>{}"/>
                <selectTemplate ref="selectTemplateRef" @selectTemplateComplete="selectTemplateComplete"/>
                <processingConditionsAll ref="processingConditionsAllRef" :processingData="processingData" @interfaceSuccessful="interfaceSuccessful"></processingConditionsAll>
                </a-spin>
            </div>
        </a-modal>
    </div>
</template>
<script>
import selectTemplate from '@/components/selectTemplate/selectTemplate.vue'
import serverEditingView from '@/components/comp-model-series/server-editing-view'
import serverEditing from '@/components/comp-model-series/server-editing.vue'
import eventSet from '../../acceptanceRegistration/eventSet.vue'
import compSelector from '@/components/compSelector/compSelector.vue'
import {typeInput, typeNumber, typeSelect, typeCheckbox, typeRadio, } from '@/components/compSearchCriteria/ContractType'
import YchConstant from "@/api/YchConstant";
import {saveSqsxFscmsServe,
    xpHcyByAutoServe,
    returnHsHsFlow,
    xpZjByAutoInCommon,
    deleteXpHcyServe,
    initWjjlServe,
    updateXpHcyxxServe,
    selectWjmbServe,
    deletemodelByIdServe,
    uploadPdfFileById,
    getLocalFileByIdServe,
    sendSmsToFileServe,
    queryFirstNodeDbrServe,
    handlingOpinionsListServe,
    addServe,
    editServe,
    addBatchIdeaServe,
    spcyRsGcyQueryByIdServe,
    spcyRsGcyEditServe,
    commonQueryHcyByXpIdServe,
    queryQyxxById,
    commonUpdateHcyJbxxServe,
    getFileTypeServe,
    xpHcyByHandServe,
    deleteBatchIdeaServe,
    ocalityPostAction,
    returnUpperXcjcFlowJob,
    againEditPdfFile,
    queryYwzdYwflContent,
    saveSelectedGcyToSqsx,
    editQyxx,
    sendSmsByXpjlQr

} from './service/index'
import moment from 'moment'
import commpVxeTable from '@/components/commp-vxe-table/commp-vxe-table.vue'
// import manualSelection from './manualSelection.vue'
import assessCheckApi from './service/api'
import blobType from '@/common/blobType'
export default {
    components:{
        serverEditing,
        compSelector,
        commpVxeTable,
        eventSet,
        serverEditingView,
        selectTemplate,
    },
    props:{
        flowPathParameter:{
            type:[Array,Object],
            default: () => {},
            required:false
        },
        addEditParameter:{
            type:[Array,Object],
            default: () => {},
            required:false
        },
    },
    watch:{
        flowPathParameter:{
            handler (newval, oldVal) {
                if(newval){
                    this.spinningKey = Date.now()
                    //console.log('流程二参数',newval)
                    this.HandledByOptions = []
                    this.formField = JSON.parse(JSON.stringify(newval))
                    // this.formField.nextNodeDbrList.forEach(item => {
                    //     item = {
                    //         value:item.dbrid,
                    //         label:item.dbr
                    //     }
                    //     let arr = this.HandledByOptions.filter(i=>i.value == item.dbrid)
                    //     if(!arr.length){
                    //         this.HandledByOptions.push(item)
                    //     }
                    // });
                    this.parameterData = newval
                    // this.$nextTick(()=>{
                    //     this.$refs.eventSetRef.getDatas(newval)
                    // })
                }
                this.matterActiveKey='事项办理'
            },
            immediate: true,
            deep: true
        },
        FieldPdf:{
            handler (newval, oldVal) {
                //console.log('当前啊存的dpf',newval)
                this.refreshTable = Date.now()
            },
            deep:true,
        }
    },
    data(){
        return{
            processingData:{},
            parameterData:{},
            matterActiveKey:'事项办理',
            collapseActiveKeyArr:[],
            visibleShowIncrease:false,
            headmanRandomNum:{},
            headmanRandomType:'',
            numberOfPeopleVisible:false,
            numberOfPeopleData:{
                fzzrs:0,
                fzyrs:0,
                fybrs:0,
            },
            selectTemplateVisible:false,
            selectTemplateKey:null,
            templateId:'',
            takeNotesId:'',
            takeNotesType:'',
            selectTemplateConfig:{
                api:assessCheckApi.queryYwflWjmbList,
                rowId: 'id',
                fywflcode:blobType.fywflcodeArr[blobType.menuType.indexOf(this.$route.name.substring(this.$route.name.indexOf('__'),this.$route.name.indexOf('_a')+2))],
                height:400,
                autoHidden:true,
                pageSize:100,
                selectType:'radio',
                listData:'wjmbList',
                paramet:{
                    sqsxid:this.flowPathParameter.sqsxid
                }
            },
            selectTemplatecolumnsVxe:[{
                    type:'radio',
                    width:60,
                },{
                    title: '模板标题', //列头显示文字
                    field: 'fmbbt',
                    key: 'fmbbt',
                },{
                    title: '模板类型', //列头显示文字
                    field: 'fmblx1',
                    key: 'fmblx1',
                }],
            selectTemplateformItem:[{
                    label: '模板标题',
                    model: 'fmbbt',
                }],
            blobType:blobType,
            routeName:this.$route.name,
            ideaVisible:false,
            nextNode:'',
            isRecordComments:false,
            opinionsList:[],
            opinionsText:'',
            form: this.$form.createForm(this, { name: 'acceptanceDealWith' }),
            spForm: this.$form.createForm(this, { name: 'acceptanceDealWithSpForm' }),
            transactForm: this.$form.createForm(this, { name: 'transactFormName' }),
            spTransactForm: this.$form.createForm(this, { name: 'spTransactFormName' }),
            fthyjForm: this.$form.createForm(this, { name: 'fthyjForm' }),
            typeRadio:typeRadio,
            typeCheckbox:typeCheckbox,
            options:[],
            selectModelkey:null,
            rules:{
                timeArr: [{
                    type:'array',
                    required: true,
                    message: '请选择审评时间',
                    trigger: 'blur',
                }],
                spTimeArr: [{
                    type:'array',
                    required: true,
                    message: '请选择审评时间',
                    trigger: 'blur',
                }],
                opinion: [{
                    required: true,
                    message: '请输入办理意见',
                    trigger: 'blur',
                }],
                fthyjInput: [{
                    required: true,
                    message: '请输入退回意见',
                    trigger: 'blur',
                }],
            },
            transactRules:{
                dbrid: [{
                    type:'array',
                    required: true,
                    message: '请选择办理人',
                    trigger: 'blur',
                }]
            },
            activeKeyArr:['1','2','3','4','5','6','7','8','9','10'],
            formField:{
                // fscms:'技术审评',
                // fcykssj:'',//审评开始时间
                // fcyjssj:'',//审评结束时间
                // fcyhbqy:[],//回避区域
                // fcyxzqy:[],//选择区域
                // fcyzytc:'',//专业特长
                // timeArr:[],
            },
           
            //补正流程
            repairPageConfig:{
                api:assessCheckApi.spbzlcflowJkPage,
                rowId: 'id',
                fywflcode:blobType.fywflcodeArr[blobType.menuType.indexOf(this.$route.name.substring(this.$route.name.indexOf('__'),this.$route.name.indexOf('_a')+2))],
                height:400,
                autoHidden:true,
                pageSize:100,
                paramet:{
                    sqsxid:this.flowPathParameter.sqsxid
                }
            },
            repairPagecolumnsVxe:[{
                title: '企业名称', //列头显示文字
                field: 'fqymc',
            },{
                title: '书面审查意见', //列头显示文字
                field: 'fblyj',
            },{
                title: '环节名称',
                field: 'fhjmc',
            },{
                title: '待办人',
                field: 'fdbr',
            },{
                title: '发送人',
                field: 'ffsrmc',
            },{
                title: '发送时间',
                field: 'ffssj',
                slots: {
                    // 使用插槽模板渲染
                    default: 'name_ffssj',
                },
            },{
                title: '办理状态',
                field: 'fblzt',
                slots: {
                    // 使用插槽模板渲染
                    default: 'name_fblzt',
                },
            }
            // ,{
            //     title: '操作',
            //     field: 'id',
            //     slots: {
            //     // 使用插槽模板渲染
            //     default: 'operation_btn',
            //     },
            //     width:260,
            //     fixed:'right'
            // }
            ],
            compSelectorkey:null,
            modeValue:'技术审评',
            manualParameter:{},
            refreshTable:null,
            disagreeObject:{},
            disagreeVisible:false,
            disagreeLoading:false,
            disagreeCause:'',
            modelType:1,
            HandledByOptions:[],//办理人
            ideaType:'办理意见',
            messageForm:{

            },
            FieldPdf:window.localStorage.getItem('FieldPdf'),
            manualKey:null,
            manualVisible:false,
            checkboxKey:[],
            observerRadioKey:'',
            vxeOptionsArr:[],
            addEditParameter:[],
            spinningKey:null,
            compSelectorkey:null,
            spinning:true,
            selectPersonnel:0,
            comprehensiveEvaluationConfig:{
                api:assessCheckApi.queryInitQtWjjlList,
                rowId: 'id',
                fywflcode:blobType.fywflcodeArr[blobType.menuType.indexOf(this.$route.name.substring(this.$route.name.indexOf('__'),this.$route.name.indexOf('_a')+2))],
                height:400,
                autoHidden:true,
                pageSize:100,
                listData:'zgtzsList',
                paramet:{
                    sqsxid:this.flowPathParameter.sqsxid
                }
            },
            comprehensiveEvaluationColumns:[{
                title: '整改通知书', //列头显示文字
                field: 'fwjccmc',
                slots: {
                    // 使用插槽模板渲染
                    default: 'fwjccmc_slots',
                },
            },{
                title: '操作',
                field: 'id',
                slots: {
                    // 使用插槽模板渲染
                    default: 'operation_btn',
                },
                width:750,
                fixed:'right'
            }],
            REPORTConfig:{
                api:assessCheckApi.queryInitQtWjjlList,
                rowId: 'id',
                fywflcode:blobType.fywflcodeArr[blobType.menuType.indexOf(this.$route.name.substring(this.$route.name.indexOf('__'),this.$route.name.indexOf('_a')+2))],
                height:400,
                autoHidden:true,
                pageSize:100,
                listData:'zgqrbgsList',
                paramet:{
                    sqsxid:this.flowPathParameter.sqsxid
                }
            },
            REPORTColumns:[{
                title: '整改确认报告书', //列头显示文字
                field: 'fwjccmc',
                slots: {
                    // 使用插槽模板渲染
                    default: 'fwjccmc_slots',
                },
            },{
                title: '操作',
                field: 'id',
                slots: {
                    // 使用插槽模板渲染
                    default: 'operation_btn',
                },
                width:750,
                fixed:'right'
            }],
        }
    },
    computed: {
        editMode(){
            return this.$store.state.permission.editMode
        },
    },
    updated(){
        this.cancelLoading()
        // this.$nextTick(()=>{
        //     this.$refs.eventSetRef.getDatas(this.parameterData)
        // })
    },
    mounted(){
        this.$nextTick(()=>{
            ocalityPostAction({dictName:'观察员所属地市'}).then(res=>{
                //console.log('字典的res',res)
                if(res.code == 200){
                    if(res.result.length){
                        this.vxeOptionsArr = res.result
                        // this.optionsDataChange(res.result,{label:'itemText',value:'itemValue'})
                        // this.vxeRadioKey = Date.now()
                    }
                    
                }
            })
        })
    },
    methods:{
        matterChange(){
            // if(this.matterActiveKey == '事项信息'){
            //     this.$nextTick(()=>{
            //         this.$refs.eventSetRef.getDatas(this.parameterData)
            //     })
            // }
        },
        refreshClick(){
            this.spinningKey = Date.now()
        },
        getData(newval){
            this.parameterData = newval
            this.$nextTick(()=>{
                this.$refs.eventSetRef.getDatas(newval)
            })
            this.flowPathParameter = newval
            this.spinningKey = Date.now()
            //console.log('是这里')
            this.spinning = true
            this.visibleShowIncrease = true
            this.HandledByOptions = []
            this.formField = JSON.parse(JSON.stringify(newval))
            if(this.formField.nextNodeDbrList){
                this.formField.nextNodeDbrList.forEach(item => {
                    item = {
                        value:item.dbrid,
                        label:item.dbr
                    }
                    let arr = this.HandledByOptions.filter(i=>i.value == item.dbrid)
                    if(!arr.length){
                        this.HandledByOptions.push(item)
                    }
                });
            }
            
            this.matterActiveKey='事项办理'
            if(this.comprehensiveEvaluationConfig){
                this.comprehensiveEvaluationConfig.paramet.sqsxid = newval.sqsxid
            }
            if(this.REPORTConfig){
                this.REPORTConfig.paramet.sqsxid = newval.sqsxid
            }
            
            // this.repairPageConfig.paramet.sqsxid = newval.sqsxid
        },
        cancelLoading(){
            let timer = setInterval((val)=>{
                this.spinning = false
                clearInterval(timer);
            },500)
            
        },
        timeProcessing(val){
            if(val){
                val = val.slice(0,11)
            }
            return val
        },
        //专家流程退回
        expertProcessReturn(val){
            var that = this
            this.$confirm({
                title:'您确认要退回吗？',
                // icon: createVNode(ExclamationCircleOutlined),
                onOk() {
                    returnHsHsFlow({jobid:that.formField.jobid}).then(res=>{
                        if(res.code == 200){
                            that.$message.success(res.message)
                            that.manualSuccess()
                        }else{
                            that.$message.warning(res.message)
                        }
                    })
                },
                
            });
        },
        goHandleClick(val){

        },
        //选择审评时间
        timeArrChange(val,num,text){
            if(num == 1){
                this.formField.spTimeArr[0] = val[0]? moment(val[0]).format('YYYY-MM-DD'):''
                this.formField.spTimeArr[1] = val[1]? moment(val[1]).format('YYYY-MM-DD'):''
                this.formField.fspkssj = val[0]? moment(val[0]).format('YYYY-MM-DD'):''
                this.formField.fspjssj = val[1]? moment(val[1]).format('YYYY-MM-DD'):''
            }else{
                this.formField.timeArr[0] = val[0]? moment(val[0]).format('YYYY-MM-DD'):''
                this.formField.timeArr[1] = val[1]? moment(val[1]).format('YYYY-MM-DD'):''
                this.formField.fcykssj = val[0]? moment(val[0]).format('YYYY-MM-DD'):''
                this.formField.fcyjssj = val[1]? moment(val[1]).format('YYYY-MM-DD'):''
            }
            this.scenePreserveClick(text)
        },
        selectHandleChangeOny(val){
            this.scenePreserveClick(val)
        },
        automaticClick(list,num){
            //console.log('这不是一个方法')
            var that = this
            list.forEach(item=>{
                if(item.num){
                    let data= {
                        ...item,
                        sqsxid:that.formField.sqsxid,
                        fssqy:num?that.formField.fspxzqy:that.formField.fcyxzqy,
                        hbqy:num?(that.formField.fsphbqy?that.formField.fsphbqy.join(','):that.formField.fsphbqy):(that.formField.fcyhbqy?that.formField.fcyhbqy.join(','):that.formField.fcyhbqy),
                        kssj:num?(moment(that.formField.spTimeArr[0]).format('YYYY-MM-DD')):(moment(that.formField.timeArr[0]).format('YYYY-MM-DD')),
                        jssj:num?(moment(that.formField.spTimeArr[1]).format('YYYY-MM-DD')):(moment(that.formField.timeArr[1]).format('YYYY-MM-DD')),
                        zytc:num?(that.formField.fspzytc?that.formField.fspzytc.join(','):that.formField.fcyzytc):(that.formField.fcyzytc?that.formField.fcyzytc.join(','):that.formField.fcyzytc),
                    }
                    if(this.modeValue == '技术审评'){
                        xpHcyByAutoServe(data).then(res=>{
                            if(res.code == 200){
                                this.numberOfPeopleData.fzzrs = 0
                                this.numberOfPeopleData.fzyrs = 0
                                this.numberOfPeopleData.fybrs = 0
                                this.$message.success('已选择')
                                this.manualSuccess()
                            }else{
                                this.$message.warning(res.message)
                            }
                        })
                    }else{
                        xpZjByAutoInCommon(data).then(res=>{
                            if(res.code == 200){
                                this.numberOfPeopleData.fzzrs = 0
                                this.numberOfPeopleData.fzyrs = 0
                                this.numberOfPeopleData.fybrs = 0
                                this.$message.success('已选择')
                                this.manualSuccess()
                            }else{
                                this.$message.warning(res.message)
                            }
                        })
                    }
                }
            })
        },
        //审查组长 列表同意或不同意
        selectAgree(val,item){
            updateXpHcyxxServe({sqsxid:this.formField.sqsxid,id:item.id,fsftyxp:item.fsftyxp,fbtyyy:item.fbtyyy}).then(res=>{
                        
                if(res.code == 200){
                    this.$message.success('修改成功')
                    this.manualSuccess()
                    this.ideaVisible = false
                }else{
                    this.$message.warning(res.message)
                }
            })
        },
        //发送短息
        sendMessage(val){
            // this.$router.push('/informationConfirmation?id='+val.id)
            var that = this
            this.$confirm({
                title:'您确认要发送短信吗？',
                // icon: createVNode(ExclamationCircleOutlined),
                onOk() {
                    sendSmsByXpjlQr({id:val.id}).then(res=>{
                        if(res.code == 200){
                            that.$message.success(res.message)
                            that.refreshTable = Date.now()
                        }else{
                            that.$message.warning(res.message)
                        }
                    })
                },
                
            });
        },
        //审查组长或组员 列表删除
        deleteClick(val){
            var that = this
            this.$confirm({
                title:'您确认要删除吗？',
                // icon: createVNode(ExclamationCircleOutlined),
                onOk() {
                    deleteXpHcyServe({sqsxid:that.formField.sqsxid,xpjlid:val.id}).then(res=>{
                        if(res.code == 200){
                            that.$message.success('删除成功')
                            that.refreshTable = Date.now()
                        }else{
                            that.$message.warning(res.message)
                        }
                    })
                },
                
            });
            
        },
        //审查组长或组员手动选
        headmanPicking(val,num){
            this.selectPersonnel = 1
            this.checkboxKey = []
            var that = this
            var formDataR = this.form
            if(num){
                formDataR = this.spForm
            }
            formDataR.validateFields((err, values) => {
                if(!err){
                    that.manualParameter = {
                        fusertype:num?num:'审评员',
                        sqsxid:that.formField.sqsxid,
                        fssk:val,
                        fssqy:num?that.formField.fspxzqy:that.formField.fcyxzqy,
                        hbqy:num?(that.formField.fsphbqy?that.formField.fsphbqy.join(','):that.formField.fsphbqy):(that.formField.fcyhbqy?that.formField.fcyhbqy.join(','):that.formField.fcyhbqy),
                        kssj:num?(moment(that.formField.spTimeArr[0]).format('YYYY-MM-DD')):(moment(that.formField.timeArr[0]).format('YYYY-MM-DD')),
                        jssj:num?(moment(that.formField.spTimeArr[1]).format('YYYY-MM-DD')):(moment(that.formField.timeArr[1]).format('YYYY-MM-DD')),
                        zytc:num?(that.formField.fspzytc?that.formField.fspzytc.join(','):that.formField.fcyzytc):(that.formField.fcyzytc?that.formField.fcyzytc.join(','):that.formField.fcyzytc),
                        type:'选人'
                    }
                    //console.log('选人的数据',that.manualParameter)
                    this.manualdataTableConfig.paramet={
                        ...that.manualParameter
                    }
                    that.manualKey = Date.now()
                    that.manualVisible = true
                }else{
                    this.$message.warning('请输入审评时间')
                }
            })
        },
        checkboxChange(val){
            this.checkboxKey = []
            if(val.length){
                val.forEach(item => {
                    this.checkboxKey.push(item.id)
                });
            }
        },
        //选择观察员
        selectObserver(){
            this.observerRadioKey = ''
            this.selectPersonnel = 0
            this.manualVisible = true
            this.modalObserverKey = Date.now()
        },
        //选中观察员
        modalObserverRadioChange(val){
            this.observerRadioKey = val.row.id
        },
        manualHandleOk(){
            if(this.selectPersonnel){
                if(!this.checkboxKey.length){
                    this.$message.warning('请选择人员')
                    return false
                }
                this.confirmLoading = true
                xpHcyByHandServe({hcyids:this.checkboxKey.join(','),
                    fusertype:this.manualParameter.fusertype,
                    jssj:this.manualParameter.jssj,
                    kssj:this.manualParameter.jssj,
                    sqsxid:this.manualParameter.sqsxid}).then(res=>{
                        this.confirmLoading = false
                        if(res.code == 200){
                            // this.$emit('manualSuccess')
                            this.refreshTable = Date.now()
                            this.manualVisible = false
                            
                        }
                    })
            }else{
                if(!this.observerRadioKey){
                    this.$message.success('请选择观察员')
                }else{
                    saveSelectedGcyToSqsx({sqsxid:this.flowPathParameter.sqsxid,id:this.observerRadioKey}).then(res=>{
                        if(res.code == 200){
                            this.refreshTable = Date.now()
                            this.manualVisible = false
                            this.$message.success(res.message)
                            this.generateRecord('选派现场观察员的函')
                        }else{
                            this.$message.warning(res.message)
                        }
                    })
                }
            }
        },
        manualSuccess(){
            this.refreshTable = Date.now()
        },
        //审查组长或组员随机选
        headmanRandom(val,num){
            var that = this
            var formDataR = this.form
            if(num){
                formDataR = this.spForm
            }
            this.headmanRandomNum = num
            this.headmanRandomType = val
            formDataR.validateFields((err, values) => {
                if(!err){
                    if(num == 0){//预备审评员
                        this.numberOfPeopleHandleOk()
                    }else{
                        this.numberOfPeopleVisible = true
                        
                    }
                    
                }else{
                    this.$message.warning('请输入审评时间')
                }
            })
            
            
        },
        numberOfPeopleHandleOk(){
            var that = this
            this.numberOfPeopleVisible = false
            var num = this.headmanRandomNum
            let data= {
                ...this.numberOfPeopleData,
                fusertype:num?num:'审评员',
                sqsxid:that.formField.sqsxid,
                fssk:this.headmanRandomType,
                fssqy:num?that.formField.fspxzqy:that.formField.fcyxzqy,
                hbqy:num?(that.formField.fsphbqy?that.formField.fsphbqy.join(','):that.formField.fsphbqy):(that.formField.fcyhbqy?that.formField.fcyhbqy.join(','):that.formField.fcyhbqy),
                kssj:num?(moment(that.formField.spTimeArr[0]).format('YYYY-MM-DD')):(moment(that.formField.timeArr[0]).format('YYYY-MM-DD')),
                jssj:num?(moment(that.formField.spTimeArr[1]).format('YYYY-MM-DD')):(moment(that.formField.timeArr[1]).format('YYYY-MM-DD')),
                zytc:num?(that.formField.fspzytc?that.formField.fspzytc.join(','):that.formField.fcyzytc):(that.formField.fcyzytc?that.formField.fcyzytc.join(','):that.formField.fcyzytc),
            }
            if(this.headmanRandomNum == 0){
                data.fybrs = 1
            }
            if(this.modeValue == '技术审评'){
                xpHcyByAutoServe(data).then(res=>{
                    if(res.code == 200){
                        this.$message.success('已选择')
                        this.manualSuccess()
                    }else{
                        this.$message.warning(res.message)
                    }
                })
            }else{
                xpZjByAutoInCommon(data).then(res=>{
                    if(res.code == 200){
                        this.$message.success('已选择')
                        this.manualSuccess()
                    }else{
                        this.$message.warning(res.message)
                    }
                })
            }
            
        },
        //不同意意见
        disagreeClick(val){
            this.disagreeObject = val
            this.disagreeCause = val.fbtyyy
            // this.disagreeVisible = true
            this.opinionsText = val.fbtyyy
            this.isIdeaText = val.fbtyyy
            this.ideaVisible = true
            this.ideaType = '选派不同意意见'
            this.getHandlingOpinionsList(this.opinionsText,this.ideaType)
        },
        //获取方案企业基本信息等
        getBasicField(title,key){
            queryYwzdYwflContent({fzdlx1:title}).then(res=>{
                if(res.code == 200){
                    this.formField[key] = res.result.content?res.result.content:''
                    this.$message.success(res.message)
                }else{
                    this.$message.warning(res.message)
                }
            })
        },
        //manualHandleOk
        
        //生成记录
        generateRecord(val){
            initWjjlServe({sqsxid:this.formField.sqsxid,type:val}).then(res=>{
                if(res.code == 200){
                    this.manualSuccess()
                    this.$message.success(res.message)
                }else{
                    this.$message.warning(res.message)
                }
            })
        },
        producerMould(row,val){
            this.$refs.selectTemplateRef.getSelectTemplate(row,val,this.formField.sqsxid)
            this.$refs.selectTemplateRef.selectTemplateVisible = true
        },
        selectTemplateComplete(){
            this.manualSuccess()
        },
        selectTemplateChange(val){
            this.templateId = val.row.id
        },
        
        //方案删除
        producerDelete(val){
            var that = this
            this.$confirm({
                title:'您确认要删除吗？',
                // icon: createVNode(ExclamationCircleOutlined),
                onOk() {
                    deletemodelByIdServe({id:val.id}).then(res=>{
                        if(res.code == 200){
                            that.manualSuccess()
                            that.$message.success('删除成功')
                        }else{
                            that.$message.warning(res.message)
                        }
                    })
                },
                
            });
            
        },
        //方案上传
        producerBeforeUpload(e){
            return false
        },
        producerUpload({file},val){//
            var that = this
            if(typeof file.uid !== 'undefined') {
                // if(file.name.indexOf(".xls") !== -1 || file.name.indexOf(".xlsx") !==-1) {
                    const fileData = new FormData();
                    fileData.append("file",file);
                    fileData.append("fywflcode",blobType.fywflcodeArr[blobType.menuType.indexOf(this.$route.name.substring(this.$route.name.indexOf('__'),this.$route.name.indexOf('_a')+2))]);
                    fileData.append("id",val.id);
                    fileData.append("sqsxid",this.formField.sqsxid);
                    
                    uploadPdfFileById(fileData).then(res => {
                        if(res.code !== 200){
                            that.$message.warning('请上传pdf文件或者联系管理员!')
                        }else{
                            this.manualSuccess()
                            that.$message.success('上传成功')
                        }
                        
                    })
                // }
                
            }
        },
        viewClick(val){
            this.$refs.serverEditingViewRef.getData({id:val.id,fwjlx:val.fwjlx})
            this.$refs.serverEditingViewRef.serverEditingVisible = true
        },
        //查看
        lookOverClick(val){
            getFileTypeServe({id:val.id}).then(res=>{
                if(res.code == 200){
                    if(res.result == '.pdf'){
                        window.open(
                            bootConfig[process.env.NODE_ENV].locality_ApI+YchConstant.SPZX_SPCY+'/spcySqsxWjjl/getCrossLocalFile?id='+val.id
                        )
                    }else{
                        this.$message.warning('只能查看pdf文件')
                    }
                    
                }
                
            })
            
        },
        //方案下载
        producerDownload(val){//下载模板
            var that = this
            var fileName = val.fwjccmc 
            let param = { fywflcode:blobType.fywflcodeArr[blobType.menuType.indexOf(this.$route.name.substring(this.$route.name.indexOf('__'),this.$route.name.indexOf('_a')+2))],id:val.id,sqsxid:this.formField.sqsxid}
            
            getFileTypeServe({id:val.id}).then(res=>{
                if(res.code == 200){
                    getLocalFileByIdServe(param).then((data) => {
                        if (!data) {
                            that.$message.warning('文件下载失败')
                        return
                        }
                        // if (typeof window.navigator.msSaveBlob !== 'undefined') {
                        //     window.navigator.msSaveBlob(new Blob([data], { type: 'application/vnd.ms-excel' }))
                        // } else {
                            let url = window.URL.createObjectURL(new Blob([data], { type: blobType.type[blobType.suffix.indexOf(val.fwjlx)] }))
                            let link = document.createElement('a')
                            link.style.display = 'none'
                            link.href = url
                            link.setAttribute('download', fileName + res.result)
                            document.body.appendChild(link)
                            link.click()
                            document.body.removeChild(link) //下载完成移除元素
                            window.URL.revokeObjectURL(url) //释放掉blob对象
                        // }
                    })
                }
                
            })
           
            
        },
        //方案发送
        producerTransmit(val){
            sendSmsToFileServe({id:val.id,sqsxid:this.formField.sqsxid}).then(res=>{
                if(res.code == 200){
                    this.$message.success('已发送')
                }else{
                    this.$message.warning(res.message)
                }
            })
        },
         //重新编辑
         againEdit(val){
            var that = this
            this.$confirm({
                title:'您确认删除已生成的pdf重新编辑文档吗？',
                // icon: createVNode(ExclamationCircleOutlined),
                onOk() {
                    againEditPdfFile({id:val.id}).then(res=>{
                        if(res.code == 200){
                            that.$webOffice(
                                `api/spzx-spcy/spcyRsWjmb/openWjjl?id=${res.result.id}`,
                                `api/spzx-spcy/spcyRsWjmb/onLineSaveWjjl?id=${res.result.id}`+`-name=${val.fwjlx1+val.fwjlx}`,
                                `api/spzx-spcy/spcyRsWjmb/saveFileToPdf2?id=${res.result.id}`+`&sqsxid=${that.formField.sqsxid}`,
                                `api/spzx-spcy/spcyRsWjmb/saveFileGzToPdf2?id=${res.result.id}`+`&sqsxid=${that.formField.sqsxid}`,
                                `api/spzx-spcy/spcyRsWjmb/againEditOutPdfFile?id=${res.result.id}`,
                            )
                            that.refreshTable = Date.now()
                        }else{
                            that.$message.warning(res.message)
                        }
                    })
                },
                
            });
        },
        //服务端编辑
        serverEdit(val){
            this.$refs.serverEditingRef.getData(val)
        },
        //在线编辑
        producerEdit(val){
            var that = this
            //console.log('在线编辑',val)
            if(val.fwjlx == '.pdf'){
                this.$message.warning('pdf文件无法编辑')
            }else{
                // window.localStorage.setItem('FieldPdf','0')
                // this.modelType = 2
                getFileTypeServe({id:val.id}).then(res=>{
                    if(res.code == 200){
                        if(res.result !== '.pdf'){
                                that.$webOffice(`api/spzx-spcy/spcyRsWjmb/openWjjl?id=${val.id}`,
                            `api/spzx-spcy/spcyRsWjmb/onLineSaveWjjl?id=${val.id}`+`-name=${val.fwjlx1+val.fwjlx}`,
                                `api/spzx-spcy/spcyRsWjmb/saveFileToPdf2?id=${val.id}`+`&sqsxid=${this.formField.sqsxid}`,
                                `api/spzx-spcy/spcyRsWjmb/saveFileGzToPdf2?id=${val.id}`+`&sqsxid=${this.formField.sqsxid}`,
                                `api/spzx-spcy/spcyRsWjmb/againEditOutPdfFile?id=${val.id}`,
                            )
                        }else{
                            this.refreshTable = Date.now()
                            this.$message.warning('pdf文件无法编辑')
                        }
                        
                    }
                    
                })
                
            }
            
        },
        //查看企业
        viewEnterprise(val){
            queryQyxxById({id:val.fbusid}).then(res=>{
                if(res.code == 200){
                    let data = res.result
                    this.addEditParameter = {
                        id:data.id,
                        fqyfddbrfzr:data.fqyfddbrfzr,
                        fqylxr:data.fqylxr,
                        fqylxrdh:data.fqylxrdh,
                        fqylxryx:data.fqylxryx,
                        fqymc:data.fqymc,
                        fqyxkzh:data.fqyxkzh,
                        fqyxkzyxq:data.fqyxkzyxq,
                        fqyzszcdz:data.fqyzszcdz,
                        fszdq:data.fszdq,
                        ftyshxydm:data.ftyshxydm,
                        fxxdz:data.fxxdz,
                        fxzjg:data.fxzjg
                    }
                    this.$refs.refModel.visibleShow = true
                }else{
                    this.$message.warning(res.message)
                }
            })

        },
        //编辑审评员
        editInspector(val,numm){
            //console.log(val)
            if(numm){//编辑企业
                this.modelType = 3
                queryQyxxById({id:val.fbusid}).then(res=>{
                    if(res.code == 200){
                        this.messageForm = {
                            id:val.fbusid,
                            idb:res.result.id,
                            fphone:res.result.fqylxrdh,
                            femail:res.result.fqylxryx,
                        }
                        this.disagreeVisible = true
                    }else{
                        this.$message.warning(res.message)
                    }
                })
            }else{
                this.modelType = 2
            
                if(val.fbusid){
                    commonQueryHcyByXpIdServe({fbusid:val.fbusid,sqsxid:this.formField.sqsxid}).then(res=>{
                        if(res.code == 200){
                            this.messageForm = {
                                id:val.fbusid,
                                idb:res.result.id,
                                fphone:res.result.phone,
                                femail:res.result.email,
                            }
                            this.disagreeVisible = true
                        }else{
                            this.$message.warning(res.message)
                        }
                    })
                }else{
                    this.messageForm = {
                        id:val.id,
                        idb:val.fuserid,
                        fphone:val.fjcylxdh,
                        femail:val.fjcyyx,
                    }
                    this.disagreeVisible = true
                }
            }
            

        },
        //编辑观察员
        editObserver(val,num){
            this.modelType = 1
            spcyRsGcyQueryByIdServe({id:val.fbusid}).then(res=>{
                if(res.code == 200){
                    //console.log(res)
                    this.messageForm = {
                        id:val.fbusid,
                        idb:res.result.id,
                        fphone:res.result.fphone,
                        femail:res.result.femail,
                    }
                    this.disagreeVisible = true
                }
            })
            
        },
        //提交观察员和审评员信息
        disagreeHandleOk(){
            this.disagreeLoading = true
            if(this.modelType == 1 ){
                spcyRsGcyEditServe({id:this.messageForm.idb,email:this.messageForm.femail,phone:this.messageForm.fphone,sqsxid:this.formField.sqsxid}).then(res=>{
                    if(res.code == 200){
                        this.disagreeVisible = false
                        this.refreshTable = Date.now()
                        this.$message.success('修改成功')
                    }else{
                        this.$message.warning(res.message)
                    }
                    this.disagreeLoading = false
                })
            }else if(this.modelType == 2){
                commonUpdateHcyJbxxServe({id:this.messageForm.idb,email:this.messageForm.femail,phone:this.messageForm.fphone,sqsxid:this.formField.sqsxid}).then(res=>{
                    if(res.code == 200){
                        this.disagreeVisible = false
                        this.refreshTable = Date.now()
                        this.$message.success('修改成功')
                    }else{
                        this.$message.warning(res.message)
                    }
                    this.disagreeLoading = false
                })
            }else if(this.modelType == 3){
                editQyxx({id:this.messageForm.id,fqylxrdh:this.messageForm.fphone,fqylxryx:this.messageForm.femail}).then(res=>{
                    if(res.code == 200){
                        this.disagreeVisible = false
                        this.refreshTable = Date.now()
                        this.$message.success('修改成功')
                    }else{
                        this.$message.warning(res.message)
                    }
                    this.disagreeLoading = false
                })
            }
            
            
        },

        ideaClick(val){
            //console.log('当前的val',val)
            // if(val == '技术审评'){
            //     // this.opinionsText = this.formField.spOpinion
            //     this.getHandlingOpinionsList(this.opinionsText,this.ideaType)
            // }else{
            //     // this.opinionsText = this.formField.opinion
                
            // }
            this.getHandlingOpinionsList(this.opinionsText,this.ideaType)
            this.ideaVisible = true
            this.ideaType = '办理意见'
            
            this.$nextTick(()=>{
                this.ideaBlur()
            })
        },
        ideaBlur(){

        },
        ideaFocusEvent(){
            this.$nextTick(()=>{
                this.ideaBlur()
            })
        },
        getHandlingOpinionsList(val,ideaType){//查询办理意见
            //console.log('查询办理意见',val,ideaType)
            handlingOpinionsListServe({ftype1:ideaType,pageNo:1,pageSize:1000,fcontent:val}).then(res=>{
                if(res.code == 200){
                    this.opinionsList = res.result.records
                }
            })
        },
        recordCommentsChange(){
            //console.log('recordCommentsChange',this.opinionsText)
            if(this.opinionsText){
                this.getHandlingOpinionsList(this.opinionsText,this.ideaType)
            }
            
            if(this.opinionsText){
                this.isRecordComments = true
            }else{
                this.isRecordComments = false
            }
        },
        selectIdea(val){//选择办理意见
            // if(this.ideaType === '办理意见'){
                this.opinionsText = val.fcontent
                //console.log('选择办理意见',val.fcontent)
                this.getHandlingOpinionsList(val.fcontent,this.ideaType)
                //console.log('val.fcontent')
            // }
            
            this.isRecordComments = false

        },
        recordCommentsFocus(){
            this.isRecordComments = true
        },
        recordCommentsBlur(){},
        deleteIdea(val){//删除办理意见
            deleteBatchIdeaServe({ids:val.id}).then(res=>{
                if(res.code == 200){
                    this.getHandlingOpinionsList(this.opinionsText,this.ideaType)
                }else{
                    this.$message.warning(res.message)
                }
            })
        },
        ideaHandleOk(){
            this.ideaVisible = false
            if(this.ideaType == '选派不同意意见'){
                updateXpHcyxxServe({sqsxid:this.formField.sqsxid,id:this.disagreeObject.id,fsftyxp:this.disagreeObject.fsftyxp,fbtyyy:this.opinionsText}).then(res=>{
                    if(res.code == 200){
                        this.$message.success(res.message)
                        this.manualSuccess()
                    }else{
                        this.$message.warning(res.message)
                    }
                })
            }
                
            this.formField.spOpinion = this.opinionsText
            this.spTransactForm.setFieldsValue({
                spOpinion:this.opinionsText,
            });
        },
        saveComments(){
            this.ideaHandleOk()
            if(this.opinionsText ){
                // (this.modeValue == '技术审评' &&this.opinionsText !== this.formField.opinion) || (this.modeValue == '技术审评' && this.opinionsText !== this.formField.spOpinion) || this.opinionsText !==this.isIdeaText
                // if (this.ideaType == '办理意见') {
                    addBatchIdeaServe({ftype1:this.ideaType,fcontent:this.opinionsText}).then(res=>{
                        // if(res.code == 200){
                        //     this.$message.success(res.message)
                        // }else{
                        //     this.$message.warning(res.message)
                        // }
                        this.getHandlingOpinionsList(this.opinionsText,this.ideaType)
                    })
                // }
            }
        },
        successReturn(){
            this.$emit('successReturn')
        },
        //退回
        forwardClick(){
            var that = this
            this.$confirm({
                title:'您确认要退回吗？',
                // icon: createVNode(ExclamationCircleOutlined),
                onOk() {
                    that.fthyjForm.validateFields((err, values) => {
                        if(!err){
                            returnUpperXcjcFlowJob({
                                    jobid:that.formField.jobid,
                                    opinion:values.fthyjInput,
                                }).then(res=>{
                                if(res.code == 200){
                                    that.visibleShowIncrease = false
                                    that.$emit('successReturn')
                                    that.$message.success(res.message)
                                }else{
                                    that.$message.warning(res.message)
                                }
                            })
                        }
                    })
                },
                
            });
        },

        sceneSubmitClick(val){
            //console.log('提交',val)
            var that = this
            if(val == '技术审评'){
                this.spForm.validateFields((err, values) => {
                    if(!err){
                        
                        that.spTransactForm.validateFields((err, values2) => {
                            if(!err){
                                let data = {
                                    jobid:that.formField.jobid,
                                    sqsxid:that.formField.sqsxid,
                                    // dbrid:values2.spDbrid.join(','),
                                    opinion:values2.spOpinion,
                                    smgflag:that.formField.spSmgflag?'是':'否',
                                    map:{
                                        fsphbqy:that.formField.fsphbqy?that.formField.fsphbqy.join(','):'',
                                        fspxzqy:that.formField.fspxzqy,
                                        fspzytc:that.formField.fspzytc?that.formField.fspzytc.join(','):'',
                                    }

                                }
                                editServe(data).then(res=>{
                                    if(res.code == 200){
                                        that.visibleShowIncrease = false
                                        that.$emit('successReturn')
                                        that.$message.success('提交成功')
                                    }else{
                                        that.$message.warning(res.message)
                                    }
                                })
                            }
                        })
                    }else{
                        this.$message.warning('请选择审评时间')
                    }
                    
                })
            }
            
        },
        linkHandling(val){
            this.$refs.processingConditionsAllRef.processingConditionsVisible = true
            let data = {
                interface:val,
                sqsxid:this.flowPathParameter.sqsxid,
                nextNodeDbrList:this.flowPathParameter.nextNodeDbrList,
                nextNode:this.flowPathParameter.nextNode,
                jobid:this.flowPathParameter.jobid,
                headerLeftTitle:'办理',
                opinionType:'书面审查意见',
                isBlr:false,
                isXyb:false,
                recordApi:'spzgqrlcQueryJobByJobId',
                headerCenterTitle:'化妆品查验--整改确认',
            }
            this.processingData = data
                
            this.$refs.processingConditionsAllRef.getData(data)
        },
        returnPreviousLink(val){
            this.$refs.processingConditionsAllRef.processingConditionsVisible = true
            let data = {
                interface:val,
                sqsxid:this.flowPathParameter.sqsxid,
                nextNodeDbrList:this.flowPathParameter.nextNodeDbrList,
                nextNode:this.flowPathParameter.nextNode,
                jobid:this.flowPathParameter.jobid,
                isBlr:false,
                isThhj:false,
                isXyb:false,
                recordApi:'spzgqrlcQueryJobByJobId',
                headerLeftTitle:'退回',
                headerCenterTitle:'化妆品查验--整改确认',
            }
            this.processingData = data
            this.$refs.processingConditionsAllRef.getData(data)
        },
        interfaceSuccessful(){
            this.visibleShowIncrease = false
            this.successReturn()
        },
    }
}
</script>
